import Application from "../../src/Application";
import CanvasKeyBoardEvent from "../../src/events/CanvasKeyBoardEvent";
import CanvasMouseEvent from "../../src/events/CanvasMouseEvent";

export default class ApplicationTest extends Application {
    // 覆写（override）基类的受保护方法dispatchKeyDown
    protected dispatchKeyDown(evt: CanvasKeyBoardEvent): void {
        // 当发生keydown事件时，将哪个键按下信息输出到console控制台
        console.log(" key : " + evt.key + " is down ");
    }
    // 覆写（override）基类的受保护方法dispatchMouseDown
    protected dispatchMouseDown(evt: CanvasMouseEvent): void {
        //当发生mousedown事件时，将canvasPosition坐标信息输出到console控制台
        console.log(" canvasPosition : " + evt.canvasPosition);
    }
    // 覆写（override）基类公开方法update
    public update(elapsedMsec: number, intervalSec: number): void {
        // console.log(" elapsedMsec : " + elapsedMsec + " intervalSec :  " + intervalSec);
    }
    // 覆写（override）基类公开方法render
    public render(): void {
        // console.log(" 调用render方法 ");
    }
}